package com.diaohw.module.system.service;

import com.diaohw.module.system.obj.dto.DepartmentDto;
import com.diaohw.module.system.obj.query.DepartmentQuery;
import com.diaohw.module.system.obj.vo.DepartmentTreeVo;
import com.diaohw.module.system.obj.vo.DepartmentVo;
import com.diaohw.platform.common.obj.page.PageResultVo;

import java.util.List;

/**
 * <p>
 * 部门 服务类
 * </p>
 *
 * @author D-Hw
 * @since 2024-07-05
 */
public interface DepartmentService  {

    /**
     * 新增
     */
    DepartmentVo create(DepartmentDto data);

    /**
     * 更新
     */
    DepartmentVo update(String id, DepartmentDto data);

    /**
     * 删除
     */
    Boolean delete(String id);

    /**
     * 依据ID查看信息
     */
    DepartmentVo detail(String id);

    /**
     * 查询列表
     */
    List<DepartmentVo> findByList(DepartmentQuery query);

    /**
     * 分页查看
     */
    PageResultVo<DepartmentVo> findByPage(DepartmentQuery query);

    /**
     * 树形结构
     */
    List<DepartmentTreeVo> tree();
}
